package com.zhao;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.WebApplicationInitializer;

/**
 * 启动器
 * 
 * @author zhaoyongfei
 *
 */
@SpringBootApplication
public class AppRunner extends SpringBootServletInitializer implements WebApplicationInitializer, ApplicationRunner {

	@Autowired
	ConfigurableApplicationContext context;

	public static void main(String[] args) {
		SpringApplication.run(AppRunner.class, args);
	}

	@Override
	public void onStartup(ServletContext container) {
		//		ServletRegistration.Dynamic registration = container.addServlet("dispatcherServlet", new DispatcherServlet());
		//		registration.setLoadOnStartup(1);
		//		registration.addMapping("/");
	}	
	@Override
	public void run(ApplicationArguments paramApplicationArguments) throws Exception {

	}
}
